Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less 1.4 Compat #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matthewwithanm
Copy link

Less 1.4 has a couple of breaking changes; namely, math needs to be wrapped in parens and mixed-unit math is disallowed. So I wrapped all the math in parens.

The one occurrence of mixed-unit math was in the calculation of @gridsystem-width. I removed the pixels unit but, honestly, I'm not sure why the value was being multiplied by 1px in the first place. I assumed it was to coerce less into rounding or something, but it didn't seem to be making a difference for me with 1.4 or 1.3.3. Which is just a roundabout way of saying that I'm not sure if b32266d is kosher, or whether something more complicated needs to be done (: Just in case, I kept it as a separate commit.

The less 1.4 beta requires all math to be done inside parenthesis.
The less 1.4 beta disallows unit inconsistency in math operations.
@frebro
Copy link

frebro commented Apr 22, 2013

I would also love to have this PR merged @tylertate

@Piedone
Copy link

Piedone commented Apr 24, 2013

I guess the multiplication with 1px was to force the unit to be pixel. This is bad anyway, the developer should be able to determine the unit (I'd prefer ems for example).
Thus that multiplication by 1 is not needed anymore.

@laughingwithu
Copy link

@matthewwithanm does this work in ems, whenever I tested removing * 1px; in my project it would break the grid. The math just did not always add up when I used ems. BTW I admit I have to update it to less 1.4 and will attempt to do this in the next few weeks.

@ProgerXP
Copy link

Any update on this one? After upgrading to lessc 1.4 I got pretty much broken designs on most of my sites.

@tobeycodes
Copy link

I'm using this although nested columns are not working correctly. It gives the article a width of 63.888888888888886% (should be around 47%). If I change it to just .column(6) then it works fine but not in IE 7

wrapper {
   .column(9);

   .articles {
      .row(9);

      article {
         .column(6,9);
      }
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants